package com.power.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.power.domain.ProdPropValue;
import com.power.service.ProdPropValueService;
import com.power.mapper.ProdPropValueMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author dingchunlin
* @description 针对表【prod_prop_value】的数据库操作Service实现
* @createDate 2024-07-10 15:12:13
*/
@Service
public class ProdPropValueServiceImpl extends ServiceImpl<ProdPropValueMapper, ProdPropValue>implements ProdPropValueService{

    @Autowired
    private ProdPropValueMapper prodPropValueMapper;

    /**
     * 根据产品ID查询属性值
     * @param prodId 产品ID
     * @return 属性值列表
     */
    @Override
    public List<ProdPropValue> queryProdPropValuesByProdId(Long prodId) {
        LambdaQueryWrapper<ProdPropValue> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(ProdPropValue::getPropId, prodId);
        return prodPropValueMapper.selectList(lambdaQueryWrapper);
    }
}




